/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#ifndef INCLUDE_BASIC_TYPE
#define INCLUDE_BASIC_TYPE

#include "basic_def.h"


#define DEF_转字符串1(s) #s
#define DEF_S(s) DEF_转字符串1(s)

#define ENABLE_VERBOSE_OUTPUT		0
#define ENABLE_APIC_CAPTURE			0
#define ENABLE_PERFALYZE_CAPTURE	0

#if ENABLE_VERBOSE_OUTPUT
#define VERBOSE(a) a##;
#else
#define VERBOSE(a)
#endif

#ifndef UNUSED
#define UNUSED(x) (void)x;
#endif


#define CUDA_CALLABLE
//#ifdef __CUDACC__
//#define CUDA_CALLABLE __host__ __device__
//#else
//#define CUDA_CALLABLE
//#endif

#define DEF_源码包装(A) #A


#include <assert.h>
#include <iostream>
#include <math.h>

#ifdef _DEBUG  

//#define new new(__FILE__, __LINE__)
//#define malloc malloc(_NORMAL_BAOCK, __FILE__, __LINE__)
//#define calloc calloc(_NORMAL_BAOCK, __FILE__, __LINE__)
//#define DEBUG_CLIENTBLOCK new( _CLIENT_BLOCK, __FILE__, __LINE__)

//#define _CRTDBG_MAP_ALLOC
//#define _CRTDBG_MAP_ALLOC_NEW
//#include <crtdbg.h>

#else

#endif



#define M_2PI 6.283185307179586476925286766559
#define PI_Divide_180 0.01745329251994329576923690768489

//M_弧度转角度
#define M_弧度转角度(X) ((X) * (180.0f/M_PI))
#define M_弧度转360角度(X) ((X) * (360.0f/M_2PI))
//M_角度转弧度
#define M_角度转弧度(X) ((X) * (M_PI/180.0))
#define M_360角度转弧度(X) ((X) * (M_PI*2.0/360.0))



struct S_类型名称 {
	E_值类型		type;
	std::u16string	name;
};

typedef void(*fp_无参数函数指针)();

#define DEF_指针转字符串(ptr) f_整数值转字符串((uint64)ptr)
#define DEF_类型指针到字符串(type, ptr) ((type*)f_整数值转字符串((uint64)ptr))

#define DEF_WString std::u16string
#define DEF_wString std::u16string
//#define DEF_u8String std::u8string



//#ifdef API_EXPORTS
//#define API_EXPORT __declspec(dllexport)
//#else
//#define API_EXPORT __declspec(dllimport)
////#define API_EXPORT
//#endif

#ifdef API_EXPORTS
#define API_EXPORT 
#else
#define API_EXPORT 
#endif


//#ifdef EngineAPI_EXPORTS
//#define EngineAPI_EXPORT __declspec(dllexport)
//#else
//#define EngineAPI_EXPORT __declspec(dllimport)
//#endif

//#define EngineAPI_EXPORT __declspec(dllexport)
#define EngineAPI_EXPORT


#endif //INCLUDE_BASIC_TYPE


